import { request } from './index';

export default {
   loginVerify: function(params, callback) {
    let reqParams = {
      phone: params.phone,
      password: params.password,
    }
    request.post('loginVerify', reqParams, callback);
  },
  sendSmsCode: function(params,callback) {
    let reqParams = {//传到后台的数据
      phone: params
    }
    request.post('sendSmsCode', reqParams, callback, false);
  },
  register: function(params, callback) {
    let reqParams = {
      phone: params.phone,
			checkCode: params.checkCode,
      password: params.password,
    }
    request.post('register', reqParams, callback);
  },
  loginOut: function(callback) {
    request.get('loginOut', callback);
  },
  ResetPassword: function(params, callback) {
    let reqParams = {//传到后台的数据
      phone: params.phone,
      code: params.smsCode,
      password: params.password,
    }
    request.post('resetPassword', reqParams, callback);
  }
}
